--[[ 编码: JX-24-21 名称: 出库单-清空和出库相关的数据 作者:HAN 日期:2025-1-29 级别:固定 (说明本段代码在项目中不太会变化) 函数: ResetOutbound 功能: 清除所有和入库业务相关的数据,包括 -- 出库单 -- 出库单明细 -- 出库波次 -- 出库波次组成 -- 出库波次明细 -- 配盘 -- 配盘明细 更改记录: --]] json = require ("json") mobox = require ("OILua_JavelinExt") m3 = require("oi_base_mobox") function ResetOutbound( strLuaDEID ) local nRet, strRetInfo local strCondition = "" nRet, strRetInfo = mobox.dbClearData(strLuaDEID, "Outbound_Order") if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), "删除【Outbound_Order】失败!"..strRetInfo) end nRet, strRetInfo = mobox.dbClearData(strLuaDEID, "Outbound_Detail") if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), "删除【Outbound_Detail】失败!"..strRetInfo) end nRet, strRetInfo = mobox.dbClearData(strLuaDEID, "Outbound_Wave") if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), "删除【Outbound_Wave】失败!"..strRetInfo) end nRet, strRetInfo = mobox.dbClearData(strLuaDEID, "OW_Compose") if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), "删除【OW_Compose】失败!"..strRetInfo) end nRet, strRetInfo = mobox.dbClearData(strLuaDEID, "OW_Detail") if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), "删除【OW_Detail】失败!"..strRetInfo) end -- 和配盘相关 nRet, strRetInfo = mobox.dbClearData(strLuaDEID, "Distribution_CNTR") if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), "删除【Distribution_CNTR】失败!"..strRetInfo) end nRet, strRetInfo = mobox.dbClearData(strLuaDEID, "Distribution_CNTR_Detail") if (nRet ~= 0) then lua.Error( strLuaDEID, debug.getinfo(1), "删除【Distribution_CNTR_Detail】失败!"..strRetInfo) end local action = { { action_type = "refresh", value = "" } } nRet, strRetInfo = mobox.setAction(strLuaDEID, lua.table2str( action )) if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "setAction错误: "..strRetInfo) end end